<template>
  <div class="main-kv-wrap">
    <img class="kv_img" alt="" :src="mainKVImg" />
    <div class="time-axis-wrap">
      <div
        class="time-item"
        v-for="(tab, index) in tabList"
        :key="index"
        :class="{ active: index === 0 }"
      >
        <span class="ft10">{{ tab.tabName }}</span>
        <span class="ft10">{{ tab.tabDate }}</span>
      </div>
      <div class="line-wrap">
        <span class="dot active"></span>
        <span class="line"></span>
        <span class="dot"></span>
        <span class="line"></span>
        <span class="dot"></span>
      </div>
    </div>
    <img class="mark-logo" :src="markLogo" />
    <div class="strategy-icon"></div>
    <div class="rule-icon"></div>
  </div>
</template>

<script>
export default {
  name: 'mainKV',
  props: {
    conferenceInfo: {
      type: Object,
      default: () => {}
    },
    mainKVImg: {
      type: String,
      default:
        'https://akmer.aikucun.com/mshop/6b7c2911f819000a69e48a0d0b16a4e56761fa58_1589008053531_84.jpg'
    },
    markLogo: {
      type: String,
      default:
        'https://akmer.aikucun.com/mshop/6b7c2911f819000a69e48a0d0b16a4e56761fa58_1589008053531_84.jpg'
    }
  },
  data() {
    return {
      tabList: [
        {
          tabName: '疯抢48小时', // tab名称
          tabDate: '6.17', // tab日期
          tabUrl: 'xxxx', // tab链接
          tabSeqNum: 1 // tab显示顺序
        },
        {
          tabName: '618嗨购盛典', // tab名称
          tabDate: '6.18', // tab日期
          tabUrl: 'xxxx', // tab链接
          tabSeqNum: 2 // tab显示顺序
        },
        {
          tabName: '大牌返场', // tab名称
          tabDate: '6.19-6.22', // tab日期
          tabUrl: 'xxxx', // tab链接
          tabSeqNum: 3 // tab显示顺序
        }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
.main-kv-wrap {
  width: 100%;
  height: 446px;
  background-color: burlywood;
  position: relative;
  .kv_img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 446px;
  }
  .time-axis-wrap {
    position: absolute;
    left: 25px;
    top: 0;
    width: 306px;
    height: 37px;
    background: linear-gradient(
      -85deg,
      rgba(177, 4, 0, 1) 0%,
      rgba(152, 0, 0, 1) 100%
    );
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    padding-left: 41px;
    padding-right: 30px;
    padding-top: 2px;
    color: #fff;
    box-sizing: border-box;
    .time-item {
      display: flex;
      flex-direction: column;
      text-align: center;
      font-weigh: bold;
      &:last-child {
        text-align: right;
      }
      &.active {
        color: #fed824;
      }
      span:first-child {
        margin-bottom: 4px;
      }
    }
    .line-wrap {
      width: 204px;
      height: 5px;
      position: absolute;
      left: 62px;
      top: 17px;
      display: flex;
      align-items: center;
      .dot {
        width: 5px;
        height: 5px;
        background: url('../img/current_time.png') no-repeat;
        background-size: 100% 100%;
        &.active {
          background: url('../img/time.png') no-repeat;
          background-size: 100% 100%;
        }
      }
      .line {
        width: 94px;
        height: 1px;
        background-color: #febe24;
      }
    }
  }
  .mark-logo {
    width: 40px;
    height: 49px;
    position: absolute;
    top: 0;
    left: 12px;
  }
  .strategy-icon {
    position: absolute;
    top: 4px;
    right: 9px;
    width: 31px;
    height: 31px;
    background: url('../img/gonlue.png') no-repeat;
    background-size: 100% 100%;
  }
  .rule-icon {
    position: absolute;
    top: 105px;
    right: 0px;
    width: 20px;
    height: 72px;
    background: url('../img/rule.png') no-repeat;
    background-size: 100% 100%;
  }
}
</style>
